﻿using System;
using Game1942.Library.Background;
using Game1942.Library.Background.Bodies;
using Game1942.Library.FlightPlans;

namespace Game1942.Library.Planes
{
    public class GuidePlane : Aircraft
    {
        public GuidePlane()
        {
            energy = new EnergyCounter(Constants.GuidePlane.Energy);
            damage = Constants.GuidePlane.Damage;
            score = Constants.GuidePlane.Score;
            manageTurn = new TurnManager(Constants.GuidePlane.Speed, Constants.GuidePlane.Rate);
            playerTeam = Constants.GuidePlane.PlayerTeam;

            flightPlan = new DownStrategy();

            position.SetBody(new Square(Constants.GuidePlane.Width, Constants.GuidePlane.Height));
        }

        public GuidePlane(Point value): this()
        {
            base.SetPosition(value);
        }

        public override void Shoot(){}

        public override void Destroy()
        {
            
            position.Deallocate();  // If it is on the map, get rid of it
            Alive = false;
            Driver.Instance.EscapeMode();
            
        }
    }
}
